import request from '@/utils/request'

// 查询企业的部门列表
export function getDepartmentList(){
    return request.get('/company/department')
}

/**
 *  新增部门接口
 *
 * ****/
 export function addDepartment(data) {
    return request({
      url: '/company/department',
      method: 'post',
      data
    })
  }

//   根据id查询部门详情
export function detailDepartment(id){
    return request.get(`/company/department/${id}`)
}

// 根据id修改部门详情
export function updateDepartment(data){
    return request.put(`/company/department/${data.id}`,data)
}

// 根据id删除部门
export function deleteDepartment(id){
    return request.delete(`/company/department/${id}`)
}